<template>
  <div>
    <el-tabs type="card" v-model="activeNameValue" @tab-click="changetabs" >
      <el-tab-pane
        v-for="(item, index) in tabList"
        :key="index"
        :label="item.label"
        :name='item.label'
      >
        <slot> </slot>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  name: "tab-table",
  props: {
    tabList: Array,
    activeName:String
  },
  data() {
    return {
      activeNameValue:this.activeName
    };
  },
  methods:{
    changetabs(){
      console.log(777,this.activeNameValue)
      this.$emit('func',this.activeNameValue)
    }
  }
};
</script>

<style lang="less" scoped>
</style>
